import {request} from '../utils/request.js'

export function submitOrder(data)
{
	return request({
		url: 'orders',
		method: 'post',
		data
	});
}

export function getPaymentOrder(data)
{
	return request({
		url: 'payments',
		method: 'get',
		data,
	});
}

export function submitPayment(data) 
{
	return request({
		url: 'payments',
		method: 'post',
		data,
	});
}

export function getOrderList()
{
	return request({
		url: 'orders',
		method:'get'
	});
}

export function getOrder(id)
{
	return request({
		url: `orders/${id}`,
		method: 'get'
	});
}